package freedom.ms.gate;

import java.util.List;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.client.SpringCloudApplication;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.cloud.gateway.discovery.DiscoveryClientRouteDefinitionLocator;
import org.springframework.cloud.gateway.discovery.DiscoveryLocatorProperties;
import org.springframework.context.annotation.Bean;

@SpringCloudApplication
//@EnableWebFluxSecurity
public class GateApp extends SpringBootServletInitializer {

	private static final Class<?> AppClass = GateApp.class;

	public static void main(String[] args) {
		SpringApplication.run(AppClass, args);
	}

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		return builder.sources(AppClass);
	}

	/*
	 * @Bean public DiscoveryClientRouteDefinitionLocator
	 * discoveryClientRouteDefinitionLocator(DiscoveryClient discoveryClient,
	 * DiscoveryLocatorProperties properties) { return new
	 * DiscoveryClientRouteDefinitionLocator(discoveryClient, properties); }
	 */
	 
}
